package cn.iot.controller.sys;

import cn.iot.common.dto.ResultMsg;
import cn.iot.sys.service.SysElectricityUseService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/sys/electricityUse")
public class SysElectricityUseController {
    @Resource
    private SysElectricityUseService sysElectricityUseService;
    private Logger logger = LoggerFactory.getLogger(getClass());

    @PostMapping("getSysElectricityUseList")
    public ResultMsg getSysElectricityUseList(@RequestParam Map<String,Object> map){
        logger.info("SysElectricityUseController getSysElectricityUseList map{}",map);
        ResultMsg msg = sysElectricityUseService.getSysElectricityUseList(map);
        logger.debug("SysElectricityUseController getSysElectricityUseList msg{}",msg);
        return msg;
    }
}
